<?php	
	require_once('nusoap/nusoap.php');
	require_once('dao/ceolink.class.php');
  
	$soap = new soap_server;
	//$soap->soap_defencoding = "UTF-8";
	$soap->configureWSDL('registerUser', 'http://php.hoshmand.org/');
	$soap->wsdl->schemaTargetNamespace = 'http://soapinterop.org/xsd/';
    
	$soap->register('registerUser',
					array(	'email' => 'xsd:string',
							'password' => 'xsd:string',
							'password_salt' => 'xsd:string',
							'full_name' => 'xsd:string',
							'joined' => 'xsd:string',
							'last_ip_address' => 'xsd:string'
							),
					array(	'return' => 'xsd:string'),
					'http://soapinterop.org/');	
	$soap->register('updateUser',
					array(	'email' => 'xsd:string',
							'password' => 'xsd:string',
							'password_salt' => 'xsd:string'							
							),
					array(	'return' => 'xsd:string'),
					'http://soapinterop.org/');	
    
	
	
	$soap->service(isset($HTTP_RAW_POST_DATA) ? utf8_decode($HTTP_RAW_POST_DATA) : '');
	
	function registerUser($email, $password, $password_salt, $full_name, $joined, $last_ip_address) {       
        $ceolink = new CEOLinkModel();
		return $ceolink->insertUser($email, $password, $password_salt, $full_name, $joined, $last_ip_address);        
	}
	function updateUser($email, $password, $password_salt) {       
        $ceolink = new CEOLinkModel();
		return $ceolink->updateUser($email, $password, $password_salt);        
	}

?>

